<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title></title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
     <script src="counterstring.js"></script>
</head>
<body>
Add length of counterstring to create:
<input type="text" id="cnt" name="cnt" />
<input type="submit" id="pressme" value="Submit" />
<br>
<script type="text/javascript">
    $(document).ready(function() {
        $("#pressme").click(function(event) {
            var cntString = counterstring($("#cnt").val());
           $("#counterstring").html(cntString);
        });
    });
</script>
If you choose a very large number like > 1000000 your browser will freeze so keep the value below 100000 and it will go fast to create the string.
<div id="counterstring"></div>
</body>
</html>